<?php // no direct access
defined('_JEXEC') or die('Restricted access');
$doc = JFactory::getDocument();
$doc->addScript(JUri::root(true)."/modules/mod_bakery_cart/js/cart.js");
$doc->addScript(JUri::root(true)."/media/com_bakerys/js/alertify.js");
$doc->addStyleSheet(JUri::root(true)."/media/com_bakerys/css/alertify.core.css");
$doc->addStyleSheet(JUri::root(true)."/media/com_bakerys/css/alertify.bootstrap.css");
JText::script("MOD_BAKERY_CART_PRODUCTNUMBERJS");
JText::script("MOD_BAKERY_CART_EMPTYJS");
$input = JFactory::getApplication()->input;
$location_id = $input->get("location");
$location_alias = $input->get("location_alias");

?>

<div id="bakery_cart_module" class="bakery_cart_module <?php echo $params->get('moduleclass_sfx'); ?>">
	<h3 class="title">
		<a onclick="showcart(<?php echo $location_id ?>)" style='cursor:pointer'>
			<?php echo JText::_("MOD_BAKERY_CART_YOURCART") ?>
		</a>
	</h3>
	<div class="total_products"><?php echo JText::_("MOD_BAKERY_CART_EMPTY") ?></div>
</div>

<form id="cart_form" action="<?php echo JRoute::_("index.php?option=com_bakerys&view=cart&location=$location_id:$location_alias") ?>" method="post">
	<input type="hidden" value="<?php echo $location_id ?>" name="location" />
</form>

<form id="checkout_form" action="<?php echo JRoute::_("index.php?option=com_bakerys&view=cart&location=$location_id:$location_alias") ?>" method="post">
	<input type="hidden" value="<?php echo $location_id ?>" name="location" />
	<input type="hidden" value="cart.checkout" name="task"/>
</form>

<script>
	checkCart(<?php echo $location_id ?>);
</script>
